﻿using System;
using System.Collections.Generic;
using Model;
using DAL;

namespace BLL
{
    #region class BScoreInfo
    /// <summary>
    /// Interface:ScoreInfo Interface
    /// Author:NetCenter
    /// DateTime:2021/5/23 15:00:29
    /// </summary>	
    public class BScoreInfo
    {
        DAL.DALScoreInfo dal = new DALScoreInfo();
        #region Add Method
        /// <summary>
        /// Insert an item
        /// </summary>
        /// <param name="ScoreInfo"></param>
        /// <returns>count of rows affected</returns>
        public int AddScoreInfo(ScoreInfoEntity ScoreInfo)
        {
            return dal.AddScoreInfo(ScoreInfo);
        }
        #endregion
        #region Mod Method
        /// <summary>
        /// Update an item
        /// </summary>
        /// <param name="ScoreInfo"></param>
        /// <returns>count of rows affected</returns>
        public int ModScoreInfo(ScoreInfoEntity ScoreInfo)
        {
            return dal.ModScoreInfo(ScoreInfo);
        }
        #endregion
        #region Del Method
        /// <summary>
        /// Del an item by primary key
        /// </summary>
        /// <param name="iD"></param> 
        /// <returns>count of rows affected</returns>
        public int DelScoreInfo(string iD)
        {
            return dal.DelScoreInfo(iD);
        }
        #endregion
        #region Select Method
        /// <summary>
        /// Select an item by Primarykey
        /// </summary>
        /// <param name="iD"></param>
        /// <returns>an item</returns>
        public ScoreInfoEntity GetScoreInfo(string iD)
        {
            return dal.GetScoreInfo(iD);
        }
        #endregion
        #region Select_All Method
        /// <summary>
        /// Select all items
        /// </summary>
        /// <returns>items</returns>
        public IList<ScoreInfoEntity> GetScoreInfos()
        {
            return dal.GetScoreInfos();
        }
        #endregion
        #region public common select by conditions ,we can use it by changing the GetScoreInfosbyCondition(datatype condition) and sql
        /// <summary>
        /// Select items by Columns
        /// </summary>
        /// <param name="columns name"></param>
        /// <returns>items</returns>
        public IList<ScoreInfoEntity> GetScoreInfosbyCondition(string sql)
        {
            return dal.GetScoreInfosbyCondition(sql);
        }
        #endregion
        #region Select items Top n
        /// <summary>
        /// Select items by Columns
        /// </summary>
        /// <param name="columns name"></param>
        /// <returns>items</returns>
        public IList<ScoreInfoEntity> GetScoreInfosTopN(int n)
        {
            return dal.GetScoreInfosTopN(n);
        }
        #endregion
    }
    #endregion
}
